/*
 * @Author: your name
 * @Date: 2022-01-20 19:47:23
 * @LastEditTime: 2022-01-20 19:48:04
 * @Description:
 */
/*
 * @Author: your name
 * @Date: 2022-01-01 21:49:07
 * @LastEditTime: 2022-01-16 01:22:23
 * @Description:
 */
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'

type RouteConfig = RouteRecordRaw & { hidden?: boolean }

export const constantRoutes:RouteConfig[] = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    hidden: true
  },
  {
    path: '/',
    component: Layout
  }
]

// 异步路由
export const asyncRoutes:RouteRecordRaw[] = []

const router = createRouter({
  history: createWebHashHistory(),
  routes: constantRoutes
})

export default router
